package com.example.ruihuada.ui.HomeModule.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.ruihuada.R


class GridItemListAdapter(data: List<Int>) :
    BaseQuickAdapter<Int, BaseViewHolder>(R.layout.list_item_gird_home, data) {
    override fun convert(helper: BaseViewHolder, item: Int?) {
        when (helper.layoutPosition) {
            0 -> helper.setText(R.id.tv_item_name, "本期活动")
            1 -> helper.setText(R.id.tv_item_name, "往期活动")
            2 -> helper.setText(R.id.tv_item_name, "活动征集")
            3 -> helper.setText(R.id.tv_item_name, "参与活动")

        }
        helper.setBackgroundRes(R.id.im_item, item!!)
    }
}